package com.example.yls.demoa;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

/**
 * Created by yls on 2018/12/18.
 */

public class MyBroadcastReceiver extends BroadcastReceiver {

    private IOnTimeListener listener;

    public MyBroadcastReceiver(IOnTimeListener listener){
        this.listener = listener;
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        String date = intent.getStringExtra("TIME");
        listener.setTime(date);
    }
}
